#include <sys/time.h>
#include <cstdio>
#include <cstdint>
#include <unistd.h>

int64_t GetNowTime()
{
    struct timeval tv;
    gettimeofday(&tv, nullptr);
    int32_t sec = tv.tv_sec;
    int32_t usec = tv.tv_usec;
    return (int64_t)sec * 1000000 + usec;
}

int32_t main(int32_t argc, const char **argv)
{
    if (argc > 1) {
        uint32_t errorInitValue = -1;

        int32_t cmdNumber = 0;
        sscanf(argv[1], "%d", &cmdNumber);

        for (int32_t i = 0; i < cmdNumber; i++) {
            printf("%ld, errorInitValue: %u\n", GetNowTime(), errorInitValue);
            sleep(1);
        }
    }
    return 0;
}
